﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CheccCoverplateCulvertAssemble.Common.Total
{
    /// <summary>
    /// 涵长
    /// </summary>
    public class CommonCulvertLength : MyNotifyPropertyChanged
    {
        public CommonCulvertLength()
        {
        }

        public CommonCulvertLength(bool isEmbeddedIn, double embeddedInValue, bool isEmbeddedOut, double epitaxyValue, double embeddedOutValue, bool isSetting, double minInterval, double maxInterval, double baseGapWidth, double tubeGapWidth, DataTable gapTable)
        {
            IsEmbeddedIn = isEmbeddedIn;
            EmbeddedInValue = embeddedInValue;
            IsEmbeddedOut = isEmbeddedOut;
            EpitaxyValue = epitaxyValue;
            EmbeddedOutValue = embeddedOutValue;
            IsSetting = isSetting;
            MinInterval = minInterval;
            MaxInterval = maxInterval;
            BaseGapWidth = baseGapWidth;
            TubeGapWidth = tubeGapWidth;
            GapTable = gapTable;
        }

        private bool _isEnbeddedIn;
        private double _embeddedInValue;
        private bool _isEmbeddedOut;
        private double _epitaxyValue;
        private double _embeddedOutValue;
        private bool _isSetting;
        private double _minInterval;
        private double _maxInterval;
        private double _baseGapWidth;
        private double _tubeGapWidth;
        private DataTable _gapTable;


        /// <summary>
        /// 进口是否内嵌
        /// </summary>
        public bool IsEmbeddedIn
        {
            get
            {
                return _isEnbeddedIn;
            }
            set
            {
                if (value == _isEnbeddedIn)
                    return;
                _isEnbeddedIn = value;
                NotifyPropertyChanged(() => IsEmbeddedIn);
            }
        }

        /// <summary>
        /// 进水口内嵌值
        /// </summary>
        public double EmbeddedInValue
        {
            get
            {
                return _embeddedInValue;
            }
            set
            {
                if (value == _embeddedInValue)
                    return;
                _embeddedInValue = value;
                NotifyPropertyChanged(() => EmbeddedInValue);
            }
        }

        /// <summary>
        /// 出口是否内嵌
        /// </summary>
        public bool IsEmbeddedOut
        {
            get
            {
                return _isEmbeddedOut;
            }
            set
            {
                if (value == _isEmbeddedOut)
                    return;
                _isEmbeddedOut = value;
                NotifyPropertyChanged(() => IsEmbeddedOut);
            }
        }

        /// <summary>
        /// 外延值
        /// </summary>
        public double EpitaxyValue
        {
            get
            {
                return _epitaxyValue;
            }
            set
            {
                if (value == _epitaxyValue)
                    return;
                _epitaxyValue = value;
                NotifyPropertyChanged(() => EpitaxyValue);
            }
        }

        /// <summary>
        /// 出水口内嵌值
        /// </summary>

        public double EmbeddedOutValue
        {
            get
            {
                return _embeddedOutValue;
            }
            set
            {
                if (value == _embeddedOutValue)
                    return;
                _embeddedOutValue = value;
                NotifyPropertyChanged(() => EmbeddedOutValue);
            }
        }

        /// <summary>
        /// 是否设置
        /// </summary>
        public bool IsSetting
        {
            get
            {
                return _isSetting;
            }
            set
            {
                if (value == _isSetting)
                    return;
                _isSetting = value;
                NotifyPropertyChanged(() => IsSetting);
            }
        }

        /// <summary>
        /// 最小间距
        /// </summary>
        public double MinInterval
        {
            get
            {
                return _minInterval;
            }
            set
            {
                if (value == _minInterval)
                    return;
                _minInterval = value;
                NotifyPropertyChanged(() => MinInterval);
            }
        }

        /// <summary>
        /// 最大间距
        /// </summary>
        public double MaxInterval
        {
            get
            {
                return _maxInterval;
            }
            set
            {
                if (value == _maxInterval)
                    return;
                _maxInterval = value;
                NotifyPropertyChanged(() => MaxInterval);
            }
        }

        /// <summary>
        /// 基础沉降缝宽
        /// </summary>
        public double BaseGapWidth
        {
            get
            {
                return _baseGapWidth;
            }
            set
            {
                if (value == _baseGapWidth)
                    return;
                _baseGapWidth = value;
                NotifyPropertyChanged(() => BaseGapWidth);
            }
        }

        /// <summary>
        /// 管节沉降缝宽
        /// </summary>
        public double TubeGapWidth
        {
            get
            {
                return _tubeGapWidth;
            }
            set
            {
                if (value == _tubeGapWidth)
                    return;
                _tubeGapWidth = value;
                NotifyPropertyChanged(() => TubeGapWidth);
            }
        }

        /// <summary>
        /// 沉降缝布置表
        /// </summary>
        public DataTable GapTable
        {
            get
            {
                return _gapTable;
            }
            set
            {
                if (value == _gapTable)
                    return;
                _gapTable = value;
                NotifyPropertyChanged(() => GapTable);
            }
        }
    }
}
